package com.flying.invest.monitor.model;

import java.util.Date;

import com.flying.common.util.Codes;
import com.flying.framework.annotation.ConstantEnum;
import com.flying.framework.annotation.Param;
import com.flying.framework.data.Data;
import com.flying.framework.data.DataSerializable;
import com.flying.framework.metadata.Meta;

@SuppressWarnings("serial")
@Meta(id="i_price_monitor",title="投资监控", table="i_price_monitor", primaryKeys={"monitor_id"})
public class PriceMonitor extends Data implements DataSerializable {
	public final static String ENTITY_NAME = "i_price_monitor";
	
	public final static String MONITOR_ID = "monitor_id";
	public final static String NAME = "name";
	public final static String INVEST_ID = "invest_id";
	public final static String ASSETS_ID = "assets_id";
	public final static String USER_ID = "user_id";
	public final static String FROM_DATE = "from_date";
	public final static String PRICE_TYPE = "price_type";
	public final static String STAGE = "stage";
	public final static String PRICE_UNIT = "price_unit";
	public final static String STAGE_PRICE1 = "stage_price1";
	public final static String MONITOR_PRICE1 = "monitor_price1";
	public final static String STAGE_PRICE2 = "stage_price2";
	public final static String MONITOR_PRICE2 = "monitor_price2";
	public final static String STAGE_PRICE3 = "stage_price3";
	public final static String MONITOR_PRICE3 = "monitor_price3";
	public final static String REMARKS = "remarks";
	public final static String CREATOR = "creator";
	public final static String CREATE_TIME = "create_time";
	public final static String UPDATOR = "updator";
	public final static String UPDATE_TIME = "update_time";
	
	public enum PriceType implements ConstantEnum<Integer> {
		MARKET_PRICE(1, "市价"), COST_PRICE(2, "成本价");

		public final int value;
		public final String remarks;

		PriceType(int value, String remarks) {
			this.value = value;
			this.remarks = remarks;
		}
		
		@Override
		public Integer value() {
			return this.value;
		}

		@Override
		public String text() {
			return remarks;
		}
	}
	
	public enum Stage implements ConstantEnum<Integer> {
		RISE(1, "上升止盈"), FELL(2, "下跌止损"), RISE_FELL(3, "上升回调"), FELL_RISE(4, "下跌反弹");

		public final int value;
		public final String remarks;

		Stage(int value, String remarks) {
			this.value = value;
			this.remarks = remarks;
		}
		
		@Override
		public Integer value() {
			return this.value;
		}

		@Override
		public String text() {
			return remarks;
		}
	}
	
	public enum PriceUnit implements ConstantEnum<Integer> {
		PRICE(0, "价格"), RATE(1, "比例");

		public final int value;
		public final String remarks;

		PriceUnit(int value, String remarks) {
			this.value = value;
			this.remarks = remarks;
		}
		
		@Override
		public Integer value() {
			return this.value;
		}

		@Override
		public String text() {
			return remarks;
		}
	}
	
	@Param(value=MONITOR_ID,   required=true,   desc="监控ID" , generator=Codes.AUTO_INCREMENT)
	private Long monitorId;
	
	@Param(value=NAME,   required=false,   maxlength=50,	desc="名称" )
	private String name;
	
	@Param(value=REMARKS,   required=false,   maxlength=400,	desc="说明" )
	private String remarks;
	
	@Param(value=INVEST_ID,   required=false,   desc="投资项目ID" )
	private Long investId;
	
	@Param(value=ASSETS_ID,   required=false,   desc="投资品种" )
	private Long assetsId;
	
	@Param(value=USER_ID,   required=true,   desc="所属用户" )
	private Long userId;
	
	@Param(value=FROM_DATE,   required=false,   desc="开始日期" )
	private Date fromDate;
	
	@Param(value=PRICE_TYPE,   required=false,   desc="监控价格", enumClass=PriceType.class )
	private Integer priceType;
	
	@Param(value=STAGE,   required=false,   desc="阶段", enumClass = Stage.class )
	private Integer stage;
	
	@Param(value=PRICE_UNIT,   required=false,   desc="价格单位", enumClass=PriceUnit.class )
	private Integer priceUnit;
	
	@Param(value=STAGE_PRICE1,   required=false,   desc="阶段价格1" )
	private Double stagePrice1;
	
	@Param(value=MONITOR_PRICE1,   required=false,   desc="监控价格1" )
	private Double monitorPrice1;
	
	@Param(value=STAGE_PRICE2,   required=false,   desc="阶段价格2" )
	private Double stagePrice2;
	
	@Param(value=MONITOR_PRICE2,   required=false,   desc="监控价格2" )
	private Double monitorPrice2;
	
	@Param(value=STAGE_PRICE3,   required=false,   desc="阶段价格3" )
	private Double stagePrice3;
	
	@Param(value=MONITOR_PRICE3,   required=false,   desc="监控价格3" )
	private Double monitorPrice3;
	
	@Param(value=CREATOR,   required=false,   maxlength=40,	desc="创建人" )
	private String creator;
	
	@Param(value=CREATE_TIME,   required=false,   desc="创建时间" )
	private Date createTime;
	
	@Param(value=UPDATOR,   required=false,   maxlength=40,	desc="修改人" )
	private String updator;
	
	@Param(value=UPDATE_TIME,   required=false,   desc="修改时间" )
	private Date updateTime;
	
	
	public Long getMonitorId() {
		return this.monitorId;
	}
	
	public void setMonitorId(Long monitorId) {
		this.monitorId = monitorId;
	}
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getRemarks() {
		return remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public Long getInvestId() {
		return this.investId;
	}
	
	public void setInvestId(Long investId) {
		this.investId = investId;
	}
	
	public Long getAssetsId() {
		return this.assetsId;
	}
	
	public void setAssetsId(Long assetsId) {
		this.assetsId = assetsId;
	}
	
	public Long getUserId() {
		return this.userId;
	}
	
	public void setUserId(Long userId) {
		this.userId = userId;
	}
	
	public Date getFromDate() {
		return this.fromDate;
	}
	
	public void setFromDate(Date fromDate) {
		this.fromDate = fromDate;
	}
	
	public Integer getPriceType() {
		return this.priceType;
	}
	
	public void setPriceType(Integer priceType) {
		this.priceType = priceType;
	}
	
	public Integer getStage() {
		return this.stage;
	}
	
	public void setStage(Integer stage) {
		this.stage = stage;
	}
	
	public Integer getPriceUnit() {
		return this.priceUnit;
	}
	
	public void setPriceUnit(Integer priceUnit) {
		this.priceUnit = priceUnit;
	}
	
	public Double getStagePrice1() {
		return this.stagePrice1;
	}
	
	public void setStagePrice1(Double stagePrice1) {
		this.stagePrice1 = stagePrice1;
	}
	
	public Double getMonitorPrice1() {
		return this.monitorPrice1;
	}
	
	public void setMonitorPrice1(Double monitorPrice1) {
		this.monitorPrice1 = monitorPrice1;
	}
	
	public Double getStagePrice2() {
		return this.stagePrice2;
	}
	
	public void setStagePrice2(Double stagePrice2) {
		this.stagePrice2 = stagePrice2;
	}
	
	public Double getMonitorPrice2() {
		return this.monitorPrice2;
	}
	
	public void setMonitorPrice2(Double monitorPrice2) {
		this.monitorPrice2 = monitorPrice2;
	}
	
	public Double getStagePrice3() {
		return this.stagePrice3;
	}
	
	public void setStagePrice3(Double stagePrice3) {
		this.stagePrice3 = stagePrice3;
	}
	
	public Double getMonitorPrice3() {
		return this.monitorPrice3;
	}
	
	public void setMonitorPrice3(Double monitorPrice3) {
		this.monitorPrice3 = monitorPrice3;
	}
	
	public String getCreator() {
		return this.creator;
	}
	
	public void setCreator(String creator) {
		this.creator = creator;
	}
	
	public Date getCreateTime() {
		return this.createTime;
	}
	
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	public String getUpdator() {
		return this.updator;
	}
	
	public void setUpdator(String updator) {
		this.updator = updator;
	}
	
	public Date getUpdateTime() {
		return this.updateTime;
	}
	
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	

}